/*
 * Copyright (C) 2011 Dirk Weißenborn, dirk.weissenborn@gmail.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.weissenborn.colabtex.client.service;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * The Interface LaTexService which communicates latex related operations with the server
 */
public interface LaTexServiceAsync {
	
	/**
	 * Creates or updates the pdf.
	 *
	 * @param padId the pad id
	 * @param callback the callback to return the string
	 */
	public void createOrUpdatePdf(String padId, AsyncCallback<String> callback);
	
	/**
	 * Gets the compile log.
	 *
	 * @param path the path
	 * @param callback the callback to return the compile log
	 */
	public void getCompileLog(String padId, AsyncCallback<String> callback);
	
	/**
	 * Send pdf file.
	 *
	 * @param path the path
	 * @param address the address
	 * @param callback the callback to return whether file was sent or not
	 */
	public void sendPdfFile(String padId, String address, AsyncCallback<Boolean> callback);
	
	/**
	 * Send tex file.
	 *
	 * @param padId the pad id
	 * @param address the address
	 * @param callback the callback to return whether file was sent or not
	 */
	public void sendTexFile(String padId, String address, AsyncCallback<Boolean> callback);
	
	public void getResources(String padId, AsyncCallback<List<String>> callback);
	
	public void deleteResource(String name, String padId, AsyncCallback<Boolean> callback);
}
